package com.tmpt.controller.action;


import com.opensymphony.xwork2.ActionSupport;
import com.tmpt.dto.Result;
import com.tmpt.service.CategoryService;
import org.apache.log4j.Logger;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

@Controller
@Scope("prototype")
public class CategoryAction extends ActionSupport {
	private Logger log = Logger.getLogger(this.getClass());
	
	private int category1Id;
	private String category1Name;
	private String result;
	private String pageShow;

	//@Resource
	CategoryService categoryService;

    
    public String addCategory1(){
//		try{
//			Result result = categoryService.addCategory1(category1Name,pageShow);
//			if(!result.isSuccess()){
//				this.result = result.getContent();
//				return this.INPUT;
//			}
//		} catch (Exception e) {
//			this.result = e.getLocalizedMessage();
//			return this.INPUT;
//		}
		return "";
	}


	public String getCategory1Name() {
		return category1Name;
	}

	public void setCategory1Name(String category1Name) {
		this.category1Name = category1Name;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public int getCategory1Id() {
		return category1Id;
	}

	public void setCategory1Id(int category1Id) {
		this.category1Id = category1Id;
	}


	public String getPageShow() {
		return pageShow;
	}


	public void setPageShow(String pageShow) {
		this.pageShow = pageShow;
	}
	
}
